import Layout from '@/page/index/index.vue';

/**
 * 路由创建规范
 * 名称使用全称使用小驼峰命名，例如
 * 商机 文件夹名称为 businessOpportunities
 * 列表为 businessOpportunities/list 组件的name为 BusinessOpportunitiesList
 * 新增或者编辑为 businessOpportunities/submit/:id 组件的name为 BusinessOpportunitiesSubmit
 * 详情为 businessOpportunities/detail/:id 组件的name为 BusinessOpportunitiesDetail
 * **/
export default [
  {
    path: '/wel',
    component: () => import('@/page/index/index.vue'),
    redirect: '/desk/index',
    children: [
      {
        path: 'index',
        name: '首页',
        meta: {
          i18n: 'dashboard',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/wel/index.vue'),
      },
    ],
  },
  //crm静态路由
  {
    path: '/crm',
    component: Layout,
    redirect: '/businessOpportunities/list',
    name: 'crm',
    children: [
      {
        path: 'client/demandSchedule/create',
        name: '新建需求表',
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/client/demandSchedule/submit.vue'),
      },
      {
        path: 'client/demandSchedule/edit/:id',
        name: '编辑需求表',
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/client/demandSchedule/submit.vue'),
      },
      {
        path: 'client/demandSchedule/update/:id',
        name: '升级需求表',
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/client/demandSchedule/submit.vue'),
      },
      {
        path: 'businessOpportunities/create',
        name: '新建商机',
        meta: {
          i18n: 'test',
          parentMenuId: '1850019778656595969',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/businessOpportunities/submit.vue'),
      },
      {
        path: 'businessOpportunities/edit/:id',
        name: '编辑商机',
        meta: {
          i18n: 'test',
          parentMenuId: '1850019778656595969',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/businessOpportunities/submit.vue'),
      },
      {
        path: 'businessOpportunities/detail/:id',
        name: '商机详情',
        meta: {
          i18n: 'test',
          parentMenuId: '1850019778656595969',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/crm/businessOpportunities/detail/index.vue'
          ),
      },
      {
        path: 'myClients/submit/:id',
        name: '新增客户',
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/crm/myClients/submit.vue'),
      },
      {
        path: 'myClients/edit/:id',
        name: '编辑客户',
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/crm/myClients/submit.vue'),
      },
      {
        path: 'myClients/detail/:id',
        name: '客户详情',
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/myClients/detail/index.vue'),
      },
      {
        path: 'businessOpportunities/business/create',
        name: '新建商机 ', // 用于我的客户详情内的创建商机按钮
        meta: {
          i18n: 'test',
          parentMenuId: '1850018730936995841',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/crm/myClients/businessCreate/index.vue'),
      },
    ],
  },
  // wms
  {
    path: '/wms',
    component: Layout,
    name: 'wms',
    children: [
      {
        path: 'warehousingEntry/:id',
        name: '入库提交',
        meta: {
          i18n: 'test',
          parentMenuId: '1872119564056989697',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/wms/warehouseRecord/warehousingEntry/index.vue'
          ),
      },
      {
        path: 'outboundOrder/:id',
        name: '出库提交',
        meta: {
          i18n: 'test',
          parentMenuId: '1872119564056989697',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/wms/warehouseRecord/outboundOrder/index.vue'
          ),
      },
    ],
  },
  // pdp
  {
    path: '/pdp',
    component: Layout,
    name: '可行性评估',
    children: [
      {
        path: 'feasibility/steps/:id',
        name: '可行性评估进度',
        meta: {
          i18n: 'test',
          parentMenuId: '1850049580101636098',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/feasibility/submitSteps/index.vue'),
      },
      {
        path: 'review/steps/:id',
        name: '评审',
        meta: {
          i18n: 'test',
          parentMenuId: '1850056040570548226',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/review/submitSteps/index.vue'),
      },
      {
        path: 'project/submit/:id',
        name: '项目立项',
        meta: {
          i18n: 'test',
          parentMenuId: '1850050339483807746',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/pdp/project/submit.vue'),
      },

      {
        path: 'planSheet/detail/:tab/:id',
        name: '现场计划单概况',
        meta: {
          i18n: 'test',
          parentMenuId: '1888745926575652866',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/planSheet/detail/index.vue'),
      },
      {
        path: 'project/detail/:tab/:projectId',
        name: '项目概况',
        meta: {
          i18n: 'test',
          parentMenuId: '1850050339483807746',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/project/detail/index.vue'),
      },
      {
        path: '/planOrder/count',
        name: '计划统计',
        meta: {
          i18n: 'test',
          parentMenuId: '1850050339483807746',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/pdp/planOrder/count.vue'),
      },
      {
        path: 'project/case/:projectId/:projectCaseId',
        name: '专案详情',
        meta: {
          i18n: 'test',
          parentMenuId: '1850053474822516737',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/project/case/detail.vue'),
      },
      {
        path: 'execution/steps/:id',
        name: '执行单新增',
        meta: {
          i18n: 'test',
          parentMenuId: '1850052298823561217',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/execution/submitSteps/index.vue'),
      },
      // {
      //   path: 'feasibility/steps/:id',
      //   name: '可行性评估进度',
      //   meta: {
      //     i18n: 'test',
      //     parentMenuId: '1850049580101636098',
      //   },
      //   component: () =>
      //     import(/* webpackChunkName: "views" */ '@/views/pdp/feasibility/submitSteps/index.vue'),
      // },
      {
        path: 'deliverystart/:id/create',
        name: '交付启动会新增',
        meta: {
          i18n: 'test',
          parentMenuId: '1850052519084003330',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/deliverystart/submit/index.vue'),
      },
      {
        path: 'deliverystart/:id/edit',
        name: '交付启动会编辑',
        meta: {
          i18n: 'test',
          parentMenuId: '1850052519084003330',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/pdp/deliverystart/submit/index.vue'),
      },
      // {
      //   path: 'feasibility/detail/:id',
      //   name: '可行性评估',
      //   meta: {
      //     i18n: 'test',
      //   },
      //   component: () =>
      //     import(/* webpackChunkName: "views" */ '@/views/pdp/feasibility/detail/index.vue'),
      // },
    ],
  },
  // pdpSetting
  {
    path: '/pdpSetting',
    component: Layout,
    name: 'PDP配置',
    children: [
      {
        path: 'planTemplate/:templateId',
        name: '计划模板明细配置',
        meta: {
          i18n: 'test',
          parentMenuId: '1861699735340113921',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/pdpSetting/planTemplate/detail/index.vue'
          ),
      },
    ],
  },
  // 工作台
  {
    path: '/desk',
    component: Layout,
    redirect: '/desk/index',
    children: [
      {
        path: 'index',
        name: '工作台',
        meta: {
          i18n: 'desk',
          parentMenuId: '1872118955253764097',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/desk/index.vue'),
      },
      {
        path: 'process/detail/:params',
        name: '详情流程',
        meta: {
          i18n: 'desk',
          parentMenuId: '1850015570893836289',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/desk/workflow/pages/process/form/detail.vue'
          ),
      },
      {
        path: 'process/start/:params',
        name: '流程新建',
        meta: {
          parentMenuId: '1869590102110900226',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/desk/workflow/pages/process/form/start.vue'
          ),
      },
    ],
  },
  {
    path: '/dict-vertical',
    component: Layout,
    redirect: '/dict-vertical/index',
    children: [
      {
        path: 'index',
        name: '字典管理',
        meta: {
          i18n: 'dict',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical.vue'),
      },
    ],
  },
  {
    path: '/info',
    component: Layout,
    redirect: '/info/index',
    name: '用户',
    children: [
      {
        path: 'index',
        name: '个人信息',
        meta: {
          i18n: 'info',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/system/userinfo.vue'),
      },
    ],
  },
  {
    path: '/wiki',
    component: Layout,
    redirect: '/wiki/index',
    name: '知识',
    children: [
      {
        path: 'index',
        name: '知识中心',
        meta: {
          i18n: 'info',
          parentMenuId: '1872119173441458177',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/wiki/index.vue'),
      },
    ],
  },
  {
    path: '/work/process/leave',
    component: Layout,
    redirect: '/work/process/leave/form',
    children: [
      {
        path: 'form/:processDefinitionId',
        name: '请假流程',
        meta: {
          i18n: 'work',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/work/process/leave/form.vue'),
      },
      {
        path: 'handle/:taskId/:processInstanceId/:businessId',
        name: '处理请假流程',
        meta: {
          i18n: 'work',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/work/process/leave/handle.vue'),
      },
      {
        path: 'detail/:processInstanceId/:businessId',
        name: '请假流程详情',
        meta: {
          i18n: 'work',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/work/process/leave/detail.vue'),
      },
    ],
  },
  {
    path: '/workflow',
    component: Layout,
    children: [
      {
        path: 'design/process/:id',
        name: '模型设计2',
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/plugin/workflow/pages/design/index.vue'),
      },
      {
        path: 'design/model/history/:id',
        name: '模型历史',
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/plugin/workflow/pages/design/model-history.vue'
          ),
      },
      {
        path: 'design/form/history/:id',
        name: '表单历史',
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/plugin/workflow/pages/design/form-history.vue'
          ),
      },
      {
        path: 'process/start/:params',
        name: '新建流程2',
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/plugin/workflow/pages/process/form/start.vue'
          ),
      },
      {
        path: 'process/detail/:params',
        name: '流程详情',
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/plugin/workflow/pages/process/form/detail.vue'
          ),
      },
    ],
  },

  {
    path: '/qms/qualitytestMng/sipCreation/addEditeconfig',
    component: Layout,
    name: 'QMS',
    children: [
      {
        path: '/qms/qualitytestMng/sipCreation/addEditeconfig',
        name: '新增/编辑配置',
        meta: {
          parentMenuId: '1894207861758545921',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/qms/qualitytestMng/sipCreation/addEditeconfig.vue'
          ),
      },
    ],
  },

  {
    path: '/scm/basicInfo/supplier/addorEdite',
    component: Layout,
    name: 'SCM',
    children: [
      {
        path: '/scm/basicInfo/supplier/addorEdite',
        name: '新增/编辑供应商',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/scm/basicInfo/supplier/addorEdite.vue'),
      },
    ],
  },
  {
    path: '/scm/basicInfo/material/addorEdite',
    component: Layout,
    name: 'material1',
    children: [
      {
        path: '/scm/basicInfo/material/addorEdite',
        name: '新增/编辑物料',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/scm/basicInfo/material/addorEdite.vue'),
      },
    ],
  },
  {
    path: '/scm/inventoryMng/outOrder/addorEdit',
    component: Layout,
    name: 'material',
    children: [
      {
        path: '/scm/inventoryMng/outOrder/addorEdit',
        name: '新增或编辑出库单',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/scm/inventoryMng/outOrder/addorEdit.vue'),
      },
    ],
  },

  {
    path: '/scm/inventoryMng/wareHousEntry/addOrEdit',
    component: Layout,
    name: 'wareHousEntry',
    children: [
      {
        path: '/scm/inventoryMng/wareHousEntry/addOrEdit',
        name: '新增或编辑入库单',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/scm/inventoryMng/warehouseEntry/addOrEdit.vue'
          ),
      },
    ],
  },

  {
    path: '/scm/purchasmng/purchaseOrder/addorEdite',
    component: Layout,
    name: 'purchaseOrder',
    children: [
      {
        path: '/scm/purchasmng/purchaseOrder/addorEdite',
        name: '采购订单',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/scm/purchasmng/purchaseOrder/addorEdite.vue'
          ),
      },
    ],
  },

  {
    path: '/scm/purchasmng/purchaseRequest/addorEdite',
    component: Layout,
    name: 'purchaseRequest',
    children: [
      {
        path: '/scm/purchasmng/purchaseRequest/addorEdite',
        name: '采购申请单',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/scm/purchasmng/purchaseRequest/addorEdite.vue'
          ),
      },
    ],
  },

  {
    path: '/scm/saleMng/saleOrder/addorEdite',
    component: Layout,
    name: 'saleOrder',
    children: [
      {
        path: '/scm/saleMng/saleOrder/addorEdite',
        name: '销售订单',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(/* webpackChunkName: "views" */ '@/views/scm/saleMng/saleOrder/addorEdite.vue'),
      },
    ],
  },

  {
    path: '/scm/saleMng/forecastSheet/addorEdite',
    component: Layout,
    name: 'forecastSheet',
    children: [
      {
        path: '/scm/saleMng/forecastSheet/addorEdite',
        name: '预测单',
        meta: {
          parentMenuId: '1902160610854780930',
        },
        component: () =>
          import(
            /* webpackChunkName: "views" */ '@/views/scm/saleMng/forecastSheet/addorEdite.vue'
          ),
      },
    ],
  },

  // {
  //   path: '/scm/wareHouseOutbound/addOrEdit',
  //   component: Layout,
  //   name: 'wareHouseOutbound',
  //   children: [
  //     {
  //       path: '/scm/wareHouseOutbound/addOrEdit',
  //       name: '出库单',
  //       meta: {
  //         parentMenuId: '1902160610854780930',
  //       },
  //       component: () =>
  //         import(/* webpackChunkName: "views" */ '@/views/scm/wareHouseOutbound/addorEdite.vue'),
  //     },
  //   ],
  // },
];
